<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>  
<%@ include file="../layout/main.jsp" %>
<script type="text/javascript" src="js/swfupload/jquery.swfupload.js"/></script>
<script type="text/javascript" src="js/swfupload/swfupload.js"/></script>
<script type="text/javascript" src="js/swfupload/media-upload.js"/></script>
 <div id="wrapper">
  <div id="page-wrapper-inner" class="gray-bg dashbard-1">

 <div class="row wrapper  white-bg page-heading">
        <!-- <div class="wrapper wrapper-content animated fadeInRight"> -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>新增语音</h5>
                        </div>
                        <div class="ibox-content">
                       <f:form action="media/create" modelAttribute="media" method="post" id="newForm" cssClass="form-horizontal">
                             <div class="form-group form-inline">
                                 <label class="form-label control-label">名称：</label>
                                 <f:input path="name" cssClass="form-control form-control-60"/>
                                 <em class="required_field">*</em>
                                 <f:errors path="name" cssClass="error-msg"></f:errors>
                             </div>
                              <div class="form-group form-inline">
                                <label class="form-label control-label">类型：</label>
                                <f:select path="category" cssClass="form-control form-control-60">
                                    <f:option value="">请选择</f:option>
                                    <f:option value="welcome">欢迎语</f:option>
                                    <f:option value="queue">排队</f:option>
                                    <f:option value="error">错误异常</f:option>
                                    <f:option value="other">其它</f:option>
                                </f:select>
                                 <em class="required_field">*</em>
                                 <f:errors path="category" cssClass="error-msg"></f:errors>
                            </div>  
                           <div class="form-group from-inline">
                                    <label class="form-label control-label">附件名称：</label>
                                            <input type="button" id="upload_button"/>
                                            <span data-func="upload-process"></span>
                                            <f:hidden path="fileName" data-name="ivr-filePath" value="" id="filePath"/>
                                           <!--  <a href="javascript:;" class="fa fa-play-circle-o" data-func="playMp3"></a> -->
                                            <f:errors path="fileName" cssClass="error-msg"></f:errors>
                                            
                                            <div id="swfupload-control">
                                            <ul id="attachment" style="display:none;">
                                            </ul>
                                        </div>
                                        </div>
                               <div class="form-group">
                                    <div class="col-sm-4 form-btn-area">
                                      <a  href="javascript:submitForm();" class="btn btn-primary" role="button">保存</a>
                                        <a  href="<c:url value="/media"/>" class="btn btn-info" role="button">取消</a>
                                    </div>
                                </div>
                       </f:form>
                    
                        </div>
                    </div>
                </div>
            </div>
        </div>
   <script type="text/javascript">
   
   function submitForm(){ 
	   $('#newForm').submit();
   }
   
   </script>
        
 </div>
 </div>